const app = getApp();
var moment = require('../../utils/moment.min');
var {boyTimeLine,girlTimeLine} = require('../../data/daily_data.js');


Page({

  data: {
    diffDay: '', //距离注册过去了多少天
    isSelectBoy: true, //是否选择男生时间线
    boyTimeLine: [], //男生时间线
    girlTimeLine: [], //女生时间线
  },

  onLoad(options) {
    const userInfo = app.globalData.userInfo;
    let diffDay = moment().diff(moment(userInfo.createTime), 'day'); //使用moment.js 计算两个日期间隔
    this.setData({
      diffDay,
      userInfo,
      boyTimeLine,
      girlTimeLine
    });
  },

  onShow() {},


  //切换男
  clickBoy() {
    this.setData({
      isSelectBoy: true
    });
  },

  //切换女
  clickGirl() {
    this.setData({
      isSelectBoy: false
    })
  },

  //分享
  onShareAppMessage: function () {

  }
})